package il.ac.tau.arielgue.outxing.helpers;

import il.ac.tau.arielgue.outxing.agents.OutXingOrganism;
import il.ac.tau.arielgue.outxing.agents.UniformOrganism;
import proevolution.GeneSimContext;
import proevolution.agents.Organism;
import proevolution.helpers.IdealParentFactory;

public class IdealOutXingParentFactory extends IdealParentFactory {

	private int[] idealAlleles = null;

	public IdealOutXingParentFactory(GeneSimContext context) {
		super(context);
		idealAlleles = new int[getGenePool().getNumOfGenes()];
		for (int i = 0; i < idealAlleles.length; i++) {
			idealAlleles[i] = OutXingOrganism.HOMOZYGOT_AA;
		}
	}

	@Override
	protected Organism createIdealOrganism() {
		OutXingOrganism o = new UniformOrganism();
		o.setGenePool(getGenePool());
		o.setAlleles(idealAlleles);
		o.setOutXingModifier(OutXingOrganism.HOMOZYGOT_AA);
		return o;
	}
}
